#!/usr/local/bin/perl -w

use strict;
use Bio::SearchIO; 
my $in = new Bio::SearchIO(-format => 'blast', 
                           -file   => $ARGV[0]);

print "Hit","\t","Length","\t","Percent_id","\t","Description","\n";

while (my $result = $in->next_result){
    while (my $hit = $result->next_hit){
        while (my $hsp = $hit->next_hsp){
            if($hsp->length('total') > 50){
                print $hit->name,"\t",
                      $hsp->length('total'),"\t",
                      my $fpid = sprintf("%.3f",$hsp->percent_identity), "\t",
                      $hit->description, "\n",
            }
        }
    }
}
